DEF_PROJECT=../../..
include $(DEF_PROJECT)/scripts/main.mk
name=ncurses
version=5.9
prefix=/usr
destdir=$(DIR_SYSROOT)
extdeps=eglibc-tools gcc-tools binutils-tools linux-header-tools

DL_SERV=http
DL_HOST=ftp.gnu.org
DL_PATH=gnu/$(name)
DL_SUFFIX=tar.gz

cflags+=--host=$(CC_TARGET)
cflags+=--build=$(CC_HOST)
cflags+=--libdir=/lib
cflags+=--with-shared
cflags+=--without-debug
cflags+=--without-ada
cflags+=--with-manpage-format=normal
cflags+=--with-build-cc="gcc -D_GNU_SOURCE"

pre-build:widec-build

widec-build:$(source)
	cd $<;$(cdefs) ./configure $(cflags) --enable-widec
	$(MAKE) -C$(if $(build),$(build),$(source)) $(mflags)
	$(MAKE) -C$(if $(build),$(build),$(source)) $(iflags)
	$(MAKE) -C$(if $(build),$(build),$(source)) clean

